 <script th:inline="javascript">
/*<![CDATA[*/

    function del(event,element){
    	event.preventDefault();
      	bootbox.confirm("删除品牌之后，该品牌下的通用信息也会自动删除，您确定删除吗?", function(result) {
    	if(result){
    		var _id = $(element).attr("href").split("_")[0];
    		var _page=$(element).attr("href").split("_")[1];
    		var _viewState = $(element).attr("href").split('_')[2];
    		BOSS.remoteCall('goods/brand/delete',$('#div_brands_grid'),{id:_id,page:_page,viewState:_viewState});
    		}
    	}); 
    }
	
/*]]>*/
</script>
<table layout:fragment="brands_table" class="table table-striped table-bordered  table-advance table-hover" id="brand_grid" name="brand_grid">
	<thead>
		<tr>
            <th>编号</th>
			<th>品牌名称</th>
			<th>品牌网址</th>
			<th>品牌描述</th>
			<th>排序</th>
			<th>品牌类型</th>
			<th>是否显示</th>
			<th>操作</th>
		</tr>
	</thead>	
	<tbody>
		<tr class="odd gradeX" th:each="data : ${brandsPage}">
            <td th:text="${data.id}">1</td>
			<td th:text="${data.name}">
				 hstyle
			</td>
			<td th:text="${data.url}">
				 
			</td>
			<td th:text="${data.description}">
				 
			</td>
			<td th:text="${data.displayOrder}">
				 120
			</td>
			<td th:text="${data.type.description}">
				 
			</td>
			
			<td class="center" th:text="${data.displayed}? 是:否">
				 12 Jan 2012
			</td>
			<td>
				 <a href="#" th:href="@{'/goods/brand/edit/'+${data.id}+'?page='+${brandsPage.number}+'&amp;viewState='+${viewState}}" th:attr="id=${'link_edit_'+dataStat.index},name=${'link_edit_'+dataStat.index}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>编辑</a>|
				 <a href="#" th:href="${data.id}+'_'+${brandsPage.number}+'_'+${viewState}" th:attr="id=${'link_delete_'+dataStat.index},name=${'link_delete_'+dataStat.index}" class="btn default btn-xs purple" onclick="del(event,this);"><i class="fa fa-minus"></i>移除</a>
			</td>		 
		</tr>
		<tr>
			<td colspan="8" align="center" th:if="${brandsPage.getNumberOfElements()==0}" th:text="${viewState == ''?'没有拉取到任何信息':'未查到任何记录，请放大查询条件试试'}">未查到任何记录，请放大查询条件试试</td>
		</tr>
 	</tbody>
</table>
<div th:include="page_footer" th:with="viewState=${viewState},url=${'/goods/brand/index'},pageContext=${brandsPage}"></div>